package com.gouying.web.vo;


import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 购物项内容
 *
 * @author ly
 */

@Data
public class CartItem {

    private Long skuId;
    /**
     * 购物项是否选中
     */
    private Boolean check = true;
    private String title;
    private String image;
    private List<String> skuAttr;
    private BigDecimal price;
    private Integer count;
    private BigDecimal totalPrice;

    /**
     * 计算当前项商品的总价格
     *
     * @return
     */
    public BigDecimal getTotalPrice() {
        return this.price.multiply(new BigDecimal("" + this.count));
    }

}
